// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved.
package fl.core ;

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.EventPhase;
import flash.events.FocusEvent;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.utils.Dictionary;
import flash.system.Capabilities;
import flash.system.IME;
import flash.system.IMEConversionMode;
import fl.core.InvalidationType;
import fl.events.ComponentEvent;
import fl.managers.FocusManager;
import fl.managers.IFocusManager;
import fl.managers.IFocusManagerComponent;
import fl.managers.StyleManager;

extern class UIComponent extends Sprite {
	public static inline var version:String = "3.0.3.1";
	public static var inCallLaterPhase:Bool=false;
	public var focusTarget:IFocusManagerComponent;
	var isLivePreview:Bool = false;
	var instanceStyles:Dynamic;
	var sharedStyles:Dynamic;
	var callLaterMethods:Dictionary;
	var invalidateFlag:Bool = false;
	var _enabled:Bool = true;
	var invalidHash:Dynamic;
	var uiFocusRect:DisplayObject;
	var isFocused:Bool =  false;
	var _width:Float;
	var _height:Float;
	var _x:Float;
	var _y:Float;
	var startWidth:Float;
	var startHeight:Float;
	var _imeMode:String = null;
	var _oldIMEMode:String = null;
	var errorCaught:Bool = false;
	var _inspector:Bool = false;
	
	public static function getStyleDefinition():Dynamic;
	public static function mergeStyles(?arg1:Dynamic, ?arg2:Dynamic, ?arg3:Dynamic, ?arg4:Dynamic, ?arg5:Dynamic, ?arg6:Dynamic, ?arg7:Dynamic, ?arg8:Dynamic, ?arg9:Dynamic, ?arg10:Dynamic, ?arg11:Dynamic, ?arg12:Dynamic, ?arg13:Dynamic, ?arg14:Dynamic, ?arg15:Dynamic, ?arg16:Dynamic):Void;
	public static var createAccessibilityImplementation:Dynamic->Dynamic;
	public var componentInspectorSetting(dynamic, dynamic):Bool;
	function beforeComponentParameters():Void;
	function afterComponentParameters():Void;
	public var enabled(dynamic, dynamic):Bool;
	public function setSize(width:Float, height:Float):Void;
	public function setStyle(style:String, value:Dynamic):Void;
	public function clearStyle(style:String):Void;
	public function getStyle(style:String):Dynamic;
	public function move(x:Float, y:Float):Void;
	function getScaleY():Float;
	function setScaleY(value:Float):Void;
	function getScaleX():Float;
	function setScaleX(value:Float):Void;
	public function validateNow():Void;
	public function invalidate(property:String = InvalidationType.ALL, callLater:Bool = true):Void;
	public function setSharedStyle(name:String, style:Dynamic):Void;
	public var focusEnabled(dynamic, dynamic):Void;
	public var mouseFocusEnabled(dynamic, dynamic):Bool;
	public var focusManager(dynamic, dynamic):IFocusManager;
	public function drawFocus(focused:Bool):Void;
	public function setFocus():Void;
	public function getFocus():InteractiveObject;
	function setIMEMode(enabled:Bool):Void;
	public function drawNow():Void;
	function configUI():Void;
	function checkLivePreview():Bool;
	function isInvalid(property:String, ?prop1:Dynamic, ?prop2:Dynamic, ?prop3:Dynamic, ?prop4:Dynamic, ?prop5:Dynamic, ?prop6:Dynamic, ?prop7:Dynamic, ?prop8:Dynamic, ?prop9:Dynamic, ?prop10:Dynamic, ?prop11:Dynamic):Bool;
	function validate():Void;
	function draw():Void;
	function getDisplayObjectInstance(skin:Dynamic):DisplayObject;
	function copyStylesToChild(child:UIComponent, styleMap:Dynamic):Void;
	function callLater(fn:Dynamic):Void;
	function createFocusManager():Void;
	function focusInHandler(event:FocusEvent):Void;
	function focusOutHandler(event:FocusEvent):Void;
	function keyDownHandler(event:KeyboardEvent):Void;
	function keyUpHandler(event:KeyboardEvent):Void;
	function hookAccessibility(event:Event):Void;
	function initializeAccessibility():Void;
}

